import runOnce from "@/components/task/runOnce"
import { render } from "vue"

const showRunOnce = (options) => {
    const mountNode = document.createElement("div")
    mountNode.id = "runonce"
    document.body.appendChild(mountNode)
    const vNode = h(runOnce, {
        ...options, onCancel: () => {
            document.body.removeChild(mountNode)
        }
    })
    render(vNode, mountNode)
}

export default showRunOnce